import pathway as pw

from application.db.mysql_db.info.ResourceInformationTagsRelation import ResourceInformationTagsRelation


class ResourceInformationTagsRelationSchema(pw.Schema):
    information_id: str
    tag_code: str
    tag_value: str


class ResourceInformationTagsRelationRead(pw.io.python.ConnectorSubject):

    def run(self):
        select_list = ResourceInformationTagsRelation.select().dicts()
        for doc in select_list:
            self.next(**doc)